package tech.aistar.day06.design.dp.version03;

/**
 * 本类用来演示:
 *
 * @author: success
 * @date: 2021/3/15 4:34 下午
 */
public class Person {
    //人应该维护中介公司
    private MiddlerCompany middlerCompany;

    public Person(MiddlerCompany middlerCompany){//传入具体的middler对象
        this.middlerCompany = middlerCompany;
    }

    //购房
    public void buy(String name){
        middlerCompany.find(name);
    }
}
